package interview.shence;

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * Question1
 *
 * @author <a href="zhaoyingling12@163.com">Zhao Simon</a>
 * @description:
 * @date 2021/4/29
 **/
public class Question1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        char[] chs = str.toCharArray();
        Map<Character, Integer> map = new LinkedHashMap<>();
        for (Character ch : chs) {
            if (!map.containsKey(ch)) {
                map.put(ch, 1);
            } else {
                int old = map.get(ch);
                map.put(ch, old + 1);
            }
        }
        String ans = "";
        for (Character key : map.keySet()) {
            int num = map.get(key);
            ans = ans + key + num;
        }
        System.out.println(ans);
    }
}
